import request from '../request.js';

//获取验证码
export const getCodeImg = () => {
	return request({
		url: '/captchaImage', 
		method: 'get',
	});
};

// 登录
export const login = (data) => {
    return request({
        url: '/login', 
        method: 'post',
        data, 
    });
};
//获取用户信息
export const getInfo = () => {
	return request({
		url: '/getInfo', 
		method: 'get',
	});
};

//退出登录
export function logout() {
  return request({
    url: '/logout',
    method: 'post'
  })
}